package com.CampusLife.service.impl;

import com.CampusLife.bean.Picture;
import com.CampusLife.dao.IPictureDao;
import com.CampusLife.service.IPictureService;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

import java.util.List;

@Service
@Transactional
public class PictureServiceImpl implements IPictureService {
    @Resource
    private IPictureDao iPictureDao;

    @Override
    public void update(Picture picture) {
        iPictureDao.update(picture);
    }

    @Override
    public List<Picture> getIndex() {
        List<Picture> pictures=  iPictureDao.getIndex();
        return pictures;
    }

    @Override
    public List<Picture> getShop() {
        List<Picture>  pictures=  iPictureDao.getShop();
        return pictures;
    }

    @Override
    public Picture ById(Integer id) {

        return iPictureDao.ById(id);
    }
}
